/*
package org.itboys.order;

import com.google.common.collect.Maps;
import org.itboys.framework.spring.controller.BaseController;
import org.itboys.fuzion.entity.ScoreLevel;
import org.itboys.fuzion.mysql.orm.FuziongMemberStatistics;
import org.itboys.fuzion.mysql.service.FuziongMemberStatisticsService;
import org.itboys.fuzion.service.FuzionMemberService;
import org.itboys.fuzion.service.ScoreLevelService;
import org.itboys.product.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

*/
/**
 * Created by weisky on 2016/5/9.
 *//*

@RestController
@RequestMapping("/index/order")
public class IndexOrderController extends BaseController {

    @Autowired
    private FuziongMemberStatisticsService fuziongMemberStatisticsService;
    @Autowired
    private FuzionMemberService fuzionMemberService;
    @Autowired
    private OrderService orderService;
    @Autowired
    private ScoreLevelService scoreLevelService;


    */
/**
     * 跳到统计页面
     * @param request
     * @param response
     * @return
     *//*

    @RequestMapping("/toCensusVM")
    public ModelAndView toListVM(Long sellerId, Model model,
            HttpServletRequest request, HttpServletResponse response) {
        if(sellerId != null){
            FuziongMemberStatistics fms = fuziongMemberStatisticsService.getSellerIncome(sellerId);
            BigDecimal totalMoney = new BigDecimal(fms.getTotalMoney()).divide(new BigDecimal(100),2);//销售额
            BigDecimal todayTotalMoney = new BigDecimal(fms.getNowTotalMoney()).divide(new BigDecimal(100),2);//今日销售额
            Long withdrawTotalMoneyTemp = fuziongMemberStatisticsService.getSellerWithdrawTotalMoney(sellerId);
            BigDecimal withdrawTotalMoney = new BigDecimal(withdrawTotalMoneyTemp).divide(new BigDecimal(100),2);//历史提现总金额

            Map<String, Object> param = Maps.newHashMapWithExpectedSize(1);
            param.put("sellerId",sellerId);
            Long memberNum = fuzionMemberService.count(param);//会员人数

            Long orderNum = orderService.count(param);//订单数

            model.addAttribute("totalMoney", totalMoney);
            model.addAttribute("withdrawTotalMoney", withdrawTotalMoney);
            model.addAttribute("memberNum", memberNum);
            model.addAttribute("orderNum", orderNum);
            model.addAttribute("todayTotalMoney", todayTotalMoney);//今日销售额

            Map<String, Object> soreParam = Maps.newHashMapWithExpectedSize(1);
            soreParam.put("sellerId",sellerId);
            List<ScoreLevel> slList = scoreLevelService.list(soreParam);
            slList.forEach(sl -> {
                List<Long> realPeopleNum = fuziongMemberStatisticsService.getMemberIdListByScoreId(sl.getId(), sl.getSellerId());
                if(realPeopleNum != null){
                    sl.setRealPeopleNum(realPeopleNum.size());
                }else{
                    sl.setRealPeopleNum(0);
                }
            });
            model.addAttribute("slList", slList);//统计当前会员等级下的会员数量
        }
        return new ModelAndView("/ace/product/index-order");
    }
}
*/
